Skip to main content

The Directional Derivative

The directional derivative is somewhat of an extension or generalization of the partial derivative.

Consider a function that outputs a single value. It can be thought of as mapping a point in a 2D plane to a point in a number line.

When we consider the partial derivative with respect to , we consider a change in , and likewise for .

Now, instead of thinking of these individually, consider a change in both and at the same time. For instance, if and incremented by some vector , how much would change?

Table of Contents

Intuition and Definition

Recall that the derivative takes a limit as this change approaches . So instead of thinking about an actual vector , we're really thinking about some where .

For instance, consider this vector:

Since we're considering , we can think of this as:

It can be thought of as a nudge in the direction and negative two nudges in the direction. The notation for this includes:

To evaluate this directional derivative, we can use a combination of partial derivatives based on the components of :

Notice that this resembles the dot product of the gradient and :

In order for the directional derivative to be the slope of the tangent line, then the vector must be a unit vector. Otherwise, it would be scaled by the magnitude of .

Formalizing the Directional Derivative

We can formalize the directional derivative as a limit. Recall that the partial derivative is defined as:

We can switch up the notation a bit to make it more general. Instead of and , we can use a vector as the input to . Then, the partial derivative is:

Notice that our change in is now , where is the unit vector in the direction. The reason we use this notation is to make it much easier to extend - all the information about the direction of the change is contained in , so we can easily change the direction of the derivative.

So, the directional derivative is defined as:

To visualize a directional derivative, consider once again, the input space of , which is a 2D plane. Instead of the input being , we can think of it as a vector . Then, the directional derivative is the rate of change of at in the direction of :

The Directional Derivative in the Context of Graphs

Recall that the partial derivative can be visualized as a slice of a surface in a 3D graph. This slice can take two directions, and .

In a similar way, the directional derivative can be visualized as a slice of the surface in a direction .

Consider the following function:

Suppose we want to find the directional derivative of at the point in the direction of .

Since derivatives are graphically represented as slopes, we need to make a unit vector. Hence:

Let's slice the graph of at , with the direction of :

We can evaluate the directional derivative by first finding the gradient of at :

Recall that the directional derivative is the dot product of the gradient and :

To illustrate why the vector has to be a unit vector, consider the same directional derivative but with a different magnitude :

Therefore, the slope can be defined as the rate of change of the function in the direction of the unit vector :

The Gradient and the Directional Derivative

Recall the definition for the directional derivative:

Let's assume is a unit vector. Then, consider the direction of the steepest ascent at some point . This can be thought of as finding a that maximizes for all .

Let's once again consider the input space of , which is a 2D plane.

Recall that the dot product of two vectors and is equal to:

Therefore, to maximize the dot product, the projection of onto must be maximized, which means that must be in the direction of . Hence:

This means:

One important takeaway is that the gradient is a tool that can be used in conjunction with other things to analyze the behavior of a function.

Example Problem: Temperature Distribution in a Room

You are an engineer tasked with optimizing the heat system in a rectangular room. The temperature is a scalar field defined by the function in degrees Celsius. The coordinates and are taken in meters from the bottom left corner of the room.

  1. A point is located somewhere in the room. Find the direction in which the temperature increases most rapidly at this point.
  2. Compute the rate of change of the temperature at in that direction.

To find the direction in which the temperature increases most rapidly, we need to find the gradient of at . The gradient is:

The direction in which the temperature increases most rapidly is the unit vector in the direction of the gradient. At point , the gradient is:

The unit vector in the direction of the gradient is the gradient divided by its magnitude:

To compute the rate of change of the temperature at in the direction of , we need to find the directional derivative:

Summary and Next Steps

The directional derivative is a generalization of the partial derivative that considers the rate of change of a function in a specific direction. It can be thought of as the dot product of the gradient and a unit vector in the direction of interest.

Here are the key points to remember:

  • The directional derivative is the rate of change of a function in a specific direction.

  • The notation for the directional derivative includes , , , and .

  • The directional derivative is formally defined as:

  • The directional derivative can also be written as a dot product:

  • Using the directional derivative we can show that the gradient points in the direction of the steepest ascent.

In the next section, we will move on from scalar fields to vector-valued functions.